<template>
  <div id="recommend">
    <com-head>已购记录</com-head>
    <div class="fatherbox">
      <div class="titleP" v-for="(item,index) in data" :key="index" @click="geidetail(item.history_id)">
         <p class="titleConent">{{item.title}}</p>
         <p class="time">{{item.add_time}}</p>
         <div class="boxmoney">&yen;{{item.info_price}}</div>
      </div>
    </div>
    <com-foot :select="3"></com-foot>
  </div>
</template>

<script>
export default {
  name: 'recommend',
  data () {
    return {
      page: "",
      ID: "data.id",
      data: []
    };
  },
  created () {
		this.getrecommend();
	},
  methods:{
    getrecommend (){
      this.axios.get('User/order')
      .then(response=>{
        console.log(response);
        this.data=response.data;
        // this.page=response.data.pages;
      })
      .catch(function (error) {
        console.log(error);
      });
    },
    geidetail (id) {
      console.log(id);
      this.$router.push({name:'expertrecommend',query:{id:id,status:2}});
    }
  }
};
</script>

<style lang="scss">
  #recommend {
    padding-top: 93px;
    // background: #ffc29b; 
    .top {
      height: 60px;
      background-image: url(../assets/images/topHong.png);
      background-position: center; 
      background-size: contain;
      background-repeat: no-repeat;
      color: white;
      font-size: 24px;
      text-align: center;
      line-height: 60px;
      margin-bottom: 39px;
    }
    .fatherbox {
    padding: 0 50px;
    .recode {
      height: 90px;
      line-height: 90px;
      border-bottom: 1Px solid #f4f4f4; 
    }
    .titleP {
        width: 100%;
        border-bottom: 1px solid #e0d8d8;
        box-sizing: border-box;
        
        position: relative;
        p:nth-of-type(1){
						font-size:26px;
				  }
        p:nth-of-type(2){
						font-size:20px;
					}
        .boxmoney {
          // width: 70px;
          height: 30px;
					font-size:26px;
          text-align: center;
          line-height: 30px;
          color: #fd0000;
          position: absolute;
          right: 15px;
          top: 50%;
          transform: translateY(-50%)
        }
        }
  }
  }
</style>
